package com.woniu.command.purchasecommand;

import com.woniu.command.Command;
import com.woniu.command.handle.PurchaseCommandHandle;
import com.woniu.outlet.po.PurchasePo;
import com.woniu.uitl.ApplicationContextHolder;


public class AddPurchaseCommand implements Command<PurchasePo,Integer> {

    private PurchaseCommandHandle handle;

    public AddPurchaseCommand() {
        this.handle = ApplicationContextHolder.getApplicationContext().getBean(PurchaseCommandHandle.class);
    }

    @Override
    public Integer excute(PurchasePo po) {
        Integer integer = handle.addPur(po);
        return integer;
    }
}
